home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / cmln1084.arc / CPORT3.LTG < prev    next >
Text File  |  1986-10-01  |  640b  |  24 lines

  1. /* algnm.h - vers. M68000-1.0
  2. Memory alignment routines.  NOTE: These def's are highly machine-dependent.
  3. */
  4.  
  5. typedef union lgnm
  6. {
  7. int *iptr;
  8. short *sptr;
  9. float *fptr;
  10. double *dptr;
  11. char *cptr;
  12. unsigned int *uptr;
  13. unsigned short *usptr;
  14. } ALIGN;
  15.  
  16. #define    _lg(p)    (((int)p.cptr) & 1 ? ++p.cptr : p.cptr)
  17. #define clgn(p) p.cptr
  18. #define ilgn(p)    ((int*)_lg(p))
  19. #define slgn(p)    ((short*)_lg(p))
  20. #define flgn(p)    ((float*)_lg(p))
  21. #define dlgn(p)    ((double*)_lg(p))
  22. #define ulgn(p)    ((unsigned*)_lg(p))
  23. #define uslgn(p)    ((unsigned short*)_lg(p))
  24.